package com.lsa.expression.tree;

import java.util.ArrayList;
import java.util.List;

public abstract class Node
{
    Node parent;
    List children = new ArrayList();
    
    public Node(Node parentArg)
    {
        this.parent = parentArg;
        if (parent != null)
        {
            this.parent.addChild(this);
        }
    }
    
    public Node getParent()
    {
        return parent;
    }
    
    public List getSubNodes()
    {
        return children;
    }
    
    public void addChild(Node child)
    {
        this.children.add(child);
    }
}
